package org.hrc.puzzleGame.mapper;

import org.hrc.puzzleGame.model.User;
import org.hrc.puzzleGame.util.DBUtil;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserMapper {
    Connection connection = DBUtil.getConnection();

      void addUser(User user) throws SQLException;

      void updateUser(User user) throws SQLException;

      void deleteUser(Integer id) throws SQLException;

      User queryById(Integer id) throws SQLException;

      List<User> queryAll() throws SQLException;

      User queryByName(String name) throws SQLException;

}
